import request from "@/utils/serviceApiH2";

/* 简历管理页面 */

// 新增备注
export function addRemarkApi(params) {
  return request({
    url: "/apiH2/member/company/resume/addRemark",
    method: "PUT",
    params,
  });
}

// 备注查询
export function selRemarkByCidAndRidApi(params) {
  return request({
    url: "/apiH2/member/company/resume/selRemarkByCidAndRid",
    method: "GET",
    params,
  });
}

// 删除投递记录
export function delDeliveryApi(id) {
  return request({
    url: `/apiH2/member/company/resume/delDelivery/${id}`,
    method: "DELETE",
  });
}

// 简历下载列表查询
export function downResumeListApi(params) {
  return request({
    url: `/apiH2/member/company/resume/downResumeList/${params.cid}`,
    method: "GET",
    params: {
      page: params.page,
      pageSize: params.pageSize,
    },
  });
}

// 新增面试邀请
export function addInterviewApi(params) {
  return request({
    url: `/apiH2/member/company/resume/interview/addInterview`,
    method: "POST",
    params
  });
}

// 面试邀请列表查询
export function interviewListApi(params) {
  return request({
    url: `/apiH2/member/company/resume/interview/interviewList`,
    method: "GET",
    params,
  });
}

// 近两周简历处理情况
export function latelyTwoWeeksApi(uid) {
  return request({
    url: `/apiH2/member/company/resume/latelyTwoWeeks/${uid}`,
    method: "GET",
  });
}

// 收到简历列表查询
export function receivedResumeListApi(params) {
  return request({
    url: `/apiH2/member/company/resume/receivedResumeList`,
    method: "GET",
    params,
  });
}

// 简历保存
export function resumeSaveApi(resumeSave) {
  return request({
    url: `/apiH2/member/company/resume/resumeSave/${resumeSave.rid}/${resumeSave.uid}`,
    method: "GET",
  });
}

// 修改备注
export function updateRemarksApi(params) {
  return request({
    url: `/apiH2/member/company/resume/updateRemarks/${params.id}`,
    method: "PUT",
    params: {
      remark: params.remark,
    },
  });
}

// 浏览记录我看过
export function viewRecordISawItApi(params) {
  return request({
    url: `/apiH2/member/company/resume/viewRecord/iSawIt/${params.uid}`,
    method: "GET",
    params: {
      page: params.page,
      pagesize: params.pagesize,
    },
  });
}

// 浏览记录看过我
export function viewRecordLookAtMeApi(params) {
  return request({
    url: `/apiH2/member/company/resume/viewRecord/lookAtMe/${params.uid}`,
    method: "GET",
    params: {
      page: params.page,
      pagesize: params.pagesize,
    },
  });
}

// 查询企业联系人列表
export function selCompanyContentListApi(uid) {
  return request({
    url: `/apiH2/member/company/resume/selCompanyContentList/${uid}`,
    method: "GET",
  });
}

// 新增收藏
export function addCollectApi(data) {
  return request({
    url: "/apiH2/member/company/resume/ResumeCollection/addResumeCollection",
    method: "POST",
    data
  });
}

// 取消收藏
export function delCollectApi(params) {
  return request({
    url: `/apiH2/member/company/recommend/ResumeCollection/${params.rid}/${params.uid}`,
    method: "DELETE",
  });
}

// 修改投递状态
export function updateDeliveryStatusApi(params) {
  return request({
    url: `/apiH2/member/company/resume/updateDeliverStatus/${params.id}/${params.status}`,
    method: "PUT",
    params,
  });
}
